import {COMPONENT_TYPE} from '../../constants'

/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-19 00:35
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'value',
      rules: [],
      label: '显示文字',
      extra: '',
    },
    attrs: {
      value: '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入显示文字'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'dashed',
      rules: [],
      label: '是否虚线',
      extra: '',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'orientation',
      rules: [],
      label: '标题位置',
      extra: '分割线标题的位置 left right center',
    },
    attrs: {
      value: 'center',
      buttonStyle: 'solid',
      children: [
        {
          value: 'center',
          label: 'center'
        },
        {
          value: 'left',
          label: 'left'
        },
        {
          value: 'right',
          label: 'right'
        }
      ]
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'type',
      rules: [],
      label: '类型',
      extra: '水平还是垂直类型 horizontal vertical',
    },
    attrs: {
      value: 'horizontal',
      buttonStyle: 'solid',
      children: [
        {
          value: 'horizontal',
          label: 'horizontal'
        },
        {
          value: 'vertical',
          label: 'vertical'
        }
      ]
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'layoutName',
      rules: [],
      label: '组件名称',
      extra: '在使用插槽时，用于标识当前组件',
    },
    attrs: {
      value: Date.now() + '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入组件名称'
    }
  }
]
